home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 January / PCWorld_2007-01_cd.bin / v cisle / autoit / autoit-v3.2.0.1-setup.exe / Examples / Helpfile / GUICtrlCreateList.au3 < prev    next >
Text File  |  2006-06-17  |  834b  |  29 lines

  1. #include <GUIConstants.au3>
  2.  
  3. GLOBAL $MESSAGE = "The following buttons have been clicked"
  4. GUICreate("My GUI list") ; will create a dialog box that when displayed is centered
  5.  
  6. $add=GUICtrlCreateButton ("Add", 64,32,75,25)
  7. $clear=GUICtrlCreateButton ("Clear", 64,72,75,25)
  8. $mylist=GUICtrlCreateList ("buttons that have been clicked", 176,32,121,97)
  9. GUICtrlSetLimit(-1,200)    ; to limit horizontal scrolling
  10. GUICtrlSetData(-1,$MESSAGE)
  11. $close=GUICtrlCreateButton ("my closing button", 64,160,175,25)
  12.  
  13. GUISetState ()
  14.  
  15. $msg = 0
  16. While $msg <> $GUI_EVENT_CLOSE
  17.     $msg = GUIGetMsg()
  18.  
  19.     Select
  20.          case $msg = $add
  21.         GUICtrlSetData($mylist,"You clicked button No1|")
  22.          case $msg = $clear
  23.         GUICtrlSetData($mylist,"")
  24.          Case $msg = $close
  25.             MsgBox(0,"", "the closing button has been clicked",2)
  26.             Exit
  27.     EndSelect
  28. Wend
  29.